<template>
    <div class="son7">
        <h3>SonDemo7</h3>
        <h3>通过泛型参数来定义 props 的类型</h3>
        <p>{{ props.title }}</p>
        <p>{{ props.user }}</p>
        <p>{{ props.msg }}</p>

    </div>
</template>

<script setup lang="ts">
export interface Iuser {
    id?: number
    name: string
    sex: string
    age: number
}
const props = defineProps<{
    title: string
    user?: Iuser
    msg?: string
}>()
</script>

<style lang="scss" scoped>
.son7 {
    padding: 10px;
    margin: 10px;
    border: 3px solid purple;
}
</style>